Skip to content

Feature-flag pricing tier availability for alpha vs demo/production#449

Merged
AJaySi merged 1 commit into
mainfrom
codex/remove-feature-flag-for-production-demo
Apr 3, 2026
Merged

Feature-flag pricing tier availability for alpha vs demo/production#449
AJaySi merged 1 commit into
mainfrom
codex/remove-feature-flag-for-production-demo

Conversation

@AJaySi
Copy link
Copy Markdown
Owner

@AJaySi AJaySi commented Mar 30, 2026

Motivation

  • Provide a simple, runtime-configurable way to either keep the Free/Basic-only alpha gate or remove it for demos/production without code changes.
  • Ensure visible plan cards and CTA behavior match the active business/demo policy so demos show the expected tiers and users can select the correct plans.

Description

  • Added a pricing mode policy in PricingPage controlled by the environment variable REACT_APP_PRICING_MODE with modes alpha, demo, and production, and exposed activeTierPolicy used throughout the page to drive behavior.
  • Enforced policy-driven visibility and selection when fetching plans (/api/subscription/plans) so only tiers in activeTierPolicy.visible are shown and only tiers in activeTierPolicy.selectable are allowed for self-serve checkout (file: frontend/src/components/Pricing/PricingPage.tsx).
  • Replaced the previous hardcoded alpha-only gating with policy checks and clearer error messages for alpha vs production flows (file: frontend/src/components/Pricing/PricingPage.tsx).
  • Made the payment modal mode-aware so alpha-only messaging (no payment required) appears only in alpha mode and production/demo show generic confirmation copy (file: frontend/src/components/Pricing/PricingPage.tsx).
  • Updated PlanCard to accept canSelectPlan and unavailableLabel props and use them to disable/label non-self-serve tiers instead of hardcoded Pro/Enterprise rules (file: frontend/src/components/Pricing/PricingPage/PlanCard.tsx).

Testing

  • Attempted a frontend build with npm run build in the container but the run failed because react-scripts is not installed in this environment (error: missing frontend/node_modules/react-scripts/scripts/build.js), so a full compile could not be validated here.
  • No other automated tests were executed in this environment; the changes are limited to UI logic and should be validated with a local npm install followed by npm run build and manual QA of the Pricing page in each REACT_APP_PRICING_MODE (alpha, demo, production).

Codex Task

@AJaySi AJaySi merged commit 8828e98 into main Apr 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant